<template>
    <div style="width: 100%">
        <el-input-number v-if="!isInstanceSearch" :style="inputStyle" :disabled="isDisable" v-model="properties.bindValue"
                         :max="properties.isMaxNum ? properties.maxNum : undefined"
                         :min="properties.isMinNum ? properties.minNum : undefined"/>

        <el-input-number v-if="isInstanceSearch" :style="inputStyle" :disabled="isDisable" v-model="properties.searchValue"
                         :max="properties.isMaxNum ? properties.maxNum : undefined"
                         :min="properties.isMinNum ? properties.minNum : undefined"/>
    </div>
</template>

<script setup lang="ts" name="YwuFormInputNumber">
import {computed, defineProps} from "vue";

let props = defineProps(['isEdit', 'properties', 'isInstanceSearch', "isDisable", "formBuildList"]);

let isEdit = computed(() => {return props['isEdit']})
let properties = computed(() => {return props['properties']})
let isInstanceSearch = computed(() => {return props['isInstanceSearch']})
let isDisable = computed(() => {return props['isDisable']})
let formBuildList = computed(() => {return props['formBuildList']})

let inputStyle = computed(() => {
    if (isEdit.value) {
        return "pointer-events: none;"
    } else {
        return "";
    }
})
</script>

<style scoped lang="less">

</style>